﻿using NUnit.Framework;

namespace SpellChecker.Tests
{
  [TestFixture]
  public partial class TestSpellCheckerWithTwoWords
  {
    [Test]
    public void CorrectWordsSeparatedByWhitespace()
    {
      var result = SpellChecker.HasSpellingErrors("Hallo Stefan");
      Assert.That(result, Is.EqualTo(false));
    }

    [Test]
    public void CorrectWordsSeparatedByTab()
    {
      var result = SpellChecker.HasSpellingErrors("Hallo\tStefan");
      Assert.That(result, Is.EqualTo(false));
    }

    [Test]
    public void CorrectWordsSeparatedByLineFeed()
    {
      var result = SpellChecker.HasSpellingErrors("Hallo\nStefan");
      Assert.That(result, Is.EqualTo(false));
    }

    [Test]
    public void CorrectWordsSeparatedByAllPunctationMarks()
    {
      var result = SpellChecker.HasSpellingErrors(@"Hallo\n.,;!?'""Stefan");
      Assert.That(result, Is.EqualTo(false));
    }

    [Test]
    public void CorrectWordsSeparatedByAllWhiteSpaces()
    {
      var result = SpellChecker.HasSpellingErrors(@"Hallo\n\t \rStefan");
      Assert.That(result, Is.EqualTo(false));
    }

    [Test]
    public void IncorrectWordsNotSeparated()
    {
      var result = SpellChecker.HasSpellingErrors("HalloStefan");
      Assert.That(result, Is.EqualTo(true));
    }


  
  
  }
}
